package utils

import (
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
)

const nameSpace = "oauth"

var IntrospectTokenTimes = promauto.NewCounter(prometheus.CounterOpts{
	Namespace: nameSpace,
	Name:      "grpc_introspect_token_times",
	Help:      "The total number of introspect token times",
})

var LoginTimes = promauto.NewCounter(prometheus.CounterOpts{
	Namespace: nameSpace,
	Name:      "total_login_times",
	Help:      "The total number of login(total_login_times = web_login_times + pda_login_times)",
})

var WebLoginTimes = promauto.NewCounter(prometheus.CounterOpts{
	Namespace: nameSpace,
	Name:      "web_login_times",
	Help:      "The total number of web login",
})

var PDALoginTimes = promauto.NewCounter(prometheus.CounterOpts{
	Namespace: nameSpace,
	Name:      "pda_login_times",
	Help:      "The total number of pda login",
})

var LoginErrorCounter = promauto.NewCounterVec(prometheus.CounterOpts{
	Namespace: nameSpace,
	Name:      "login_error_counter",
	Help:      "login error counter",
}, []string{"error_type"})
